home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nibble Magazine
/
nib21b.dsk
/
TADPOLE (JOYSTICK).bas
< prev
next >
Wrap
BASIC Source File
|
2023-02-26
|
5KB
|
91 lines
1 REM ***********************
2 REM * TADPOLE *
3 REM * BY JOHN E. VOJTISEK *
4 REM * COPYRIGHT (C) 1984 *
5 REM * BY MICROSPARC, INC. *
6 REM * LINCOLN, MA. 01773 *
7 REM ***********************
10 TEXT : HOME : VTAB 5: HTAB 12: PRINT "TADPOLE ALPHABET": VTAB 8: HTAB 4: PRINT "WRITTEN BY JOHN E. VOJTISEK PH.D.": VTAB 11: PRINT "** COPYRIGHT 1984 BY MICROSPARC, INC. **": VTAB 22: PRINT " <PRESS ANY KEY TO START>": WAIT -16384,128: POKE -16368,0
20 DIM VT(26),HT(26): HOME
30 S1$ = "*":S2$ = ":":S3$ = ".":AL$ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ":SOUND = 768
40 REM POKE SOUNDS
50 FOR Z = 0 TO 14: READ DA: POKE SOUND +Z,DA: NEXT
60 DATA 166,7,164,6,173,48,192,136,208,253,202,208,245,96,0
70 REM DIFFICULTY LEVEL MENU
80 SPEED= 255: VTAB 1: HTAB 1: PRINT "INDICATE DIFFICULTY LEVEL"; SPC( 65);"#1=EASY" SPC( 33);"#2"; SPC( 38);"#3"; SPC( 38);"#4=HARD"; SPC( 73);"#5=QUIT << >>": VTAB 8: HTAB 24: GET DF$:DF = VAL(DF$): IF DF <1 OR DF >5 THEN 80
90 IF DF = 5 THEN HOME : END
100 REM RANDOM COLUMNS
110 NU$ = "": FOR I = 11 TO 49:NU$ = NU$ + STR$(I): NEXT
120 FOR J = 38 TO 13 STEP -1:RN = 2 * INT( RND(1) *J) +1:HT(39 -J) = VAL( MID$ (NU$,RN,2)) -10: IF RN = 1 THEN NU$ = MID$ (NU$,RN +2,J *2): GOTO 150
130 NU$ = LEFT$(NU$,RN -1) + MID$ (NU$,RN +2,J *2)
140 REM RANDOM ROWS
150 VT(39 -J) = INT( RND(1) *18) +1: NEXT J
160 BG = 1: GOTO 340
170 REM 'TYPE' SOUNDS
180 FOR Z = 1 TO RND(1) *4 +1:ZZ = PEEK( -16336) - PEEK( -16336): NEXT : RETURN
190 REM MOVING RIGHT
200 SPEED= 120: INVERSE : VTAB VT(BG): FOR K = HT(BG) TO BG -1: HTAB K: PRINT " "; MID$ (AL$,BG,1);: GOSUB 180: NEXT : NORMAL :HT(BG) = BG: RETURN
210 REM MOVING DOWN
220 SPEED= 165: INVERSE : FOR K = VT(BG) TO VL: POKE 6,10 *K +20: POKE 7,50: CALL SOUND: VTAB K: HTAB HT(BG): PRINT " ": HTAB HT(BG): PRINT MID$ (AL$,BG,1);: NEXT : VTAB VL +1: HTAB HT(BG): PRINT " ";: NORMAL : RETURN
230 REM MOVING LEFT
240 SPEED= 130: FOR K = HT(BG) -1 TO BG STEP -1: GOSUB 180: HTAB K: PRINT MID$ (AL$,BG,1);: INVERSE : PRINT "<";: NORMAL : NEXT : RETURN
250 REM CATCH HORIZONTAL
260 IF V < >VT(BG) THEN GOTO 630
270 SPEED= 255:ST = 1: IF HT(BG) <H THEN ST = -1
280 FOR Z = H +ST TO HT(BG) -1 *ST STEP ST: VTAB V: HTAB Z: PRINT CHR$(94);: NEXT : GOTO 680
290 REM CATCH VERTICAL
300 IF H < >HT(BG) THEN GOTO 630
310 SPEED= 255:ST = 1: IF VT(BG) <V THEN ST = -1
320 FOR Z = V +ST TO VT(BG) -1 *ST STEP ST: HTAB H: VTAB Z: PRINT CHR$(62);: NEXT : GOTO 680
330 REM NEXT LETTER RE-ENTRY
340 HOME : POKE 35,24: SPEED= 255:Y = 0
350 REM DIFFICULTY OUTPUT
360 IF DF = 4 THEN FOR J = 1 TO 26: GOTO 390
370 FOR J = BG TO 26
380 IF DF = 1 AND J = BG THEN POKE 50,127
390 VTAB VT(J): HTAB HT(J): PRINT MID$ (AL$,J,1);: NORMAL : NEXT J
400 IF DF <3 THEN VTAB 24: HTAB BG: INVERSE : PRINT MID$ (AL$,BG,1);: NORMAL
410 REM STARTING POSITION
420 V = 22:H = INT( RND(1) *34 +1)
430 V2 = V:V3 = V:V4 = V:V5 = V:V6 = V
440 H2 = H +1:H3 = H +2:H4 = H +3:H5 = H +4:H6 = H +5
450 REM PRINT CREATURE RE-ENTRY
460 SPEED= 180
470 HTAB H2: VTAB V2: PRINT S2$
480 HTAB H3: VTAB V3: PRINT S2$
490 HTAB H4: VTAB V4: PRINT S3$
500 HTAB H5: VTAB V5: PRINT S3$
510 HTAB H6: VTAB V6: PRINT " "
520 HTAB H: VTAB V: PRINT S1$
530 IF H = HT(BG) AND V = VT(BG) THEN 680
540 V6 = V5:V5 = V4:V4 = V3:V3 = V2:V2 = V
550 H6 = H5:H5 = H4:H4 = H3:H3 = H2:H2 = H
560 REM READ BUTTONS & PADDLES
570 X = PEEK( -16384): POKE -16368,0: IF X = 155 THEN HOME : GOTO 80
580 IF X <128 THEN 630
590 IF PEEK( -16286) >127 THEN GOTO 260
600 IF PEEK( -16287) >127 THEN GOTO 290
610 REM MOVE & KEEP ON SCREEN
620 X = PDL(0):Y = PDL(1)
630 IF X <55 THEN H = H -1: IF H <1 THEN H = 1: GOTO 460
640 IF X >200 THEN H = H +1: IF H >40 THEN H = 40: GOTO 460
650 IF Y <55 THEN V = V -1: IF V <1 THEN V = 1: GOTO 460
660 IF Y >200 THEN V = V +1: IF V >22 THEN V = 22
670 GOTO 460
680 FOR BZ = 1 TO 10: POKE 6, RND(1) *50 +1: POKE 7,255: CALL SOUND: NEXT
690 REM COORDINATES MOVES
700 IF HT(BG) >BG THEN VL = 22: GOSUB 220: GOSUB 240: GOTO 730
710 IF HT(BG) <BG THEN GOSUB 200
720 VL = 21: GOSUB 220: VTAB 23: HTAB HT(BG): PRINT MID$ (AL$,BG,1);
730 FOR Z = 1 TO 25: POKE 6,200: POKE 7,5: CALL SOUND: NEXT
740 SPEED= 255: HTAB BG +1: CALL -868: POKE 35,22: IF BG <26 THEN BG = BG +1: GOTO 340
750 REM GRANDE FINALE
760 HOME : POKE 35,24: VTAB 23: CALL -868
770 SPEED= 175
780 FOR I = 23 TO 10 STEP -1: VTAB I: HTAB 25 -I: INVERSE : PRINT AL$;: VTAB I +1: HTAB 1: CALL -868
790 NEXT : SPEED= 200
800 FOR I = 14 TO 2 STEP -1: VTAB 10: HTAB I: PRINT AL$;" ";: NEXT
810 FOR I = 26 TO 1 STEP -1: SPEED= 200 -3 *(26 -I): VTAB 10: HTAB 1: PRINT RIGHT$(AL$,I);" ";: NEXT : HTAB 1: PRINT " ";: NORMAL
820 FOR I = 1 TO 20: VTAB 10: HTAB I: PRINT " ";: HTAB 41 -I: PRINT " ";: NEXT
830 X = PEEK( -16384): POKE -16368,0: IF X = 155 THEN HOME : GOTO 80
840 GOTO 100